<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="/WebFinalProject/css/FinalProjectCSS.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="table.js"></script>
<script type="text/javascript">
function goToThread(task,id) {
		document.forms[0].task.value = task;
		document.forms[0].idThread.value = id;
		//alert(task + ', '+ id);
		document.forms[0].submit();
}
function flyToPage(logNotifId,notifId){
	document.forms[0].task.value = 'goToNotifDest';
	document.forms[0].elements["modelLogNotif.logId"].value = logNotifId;
	document.forms[0].elements["modelLogNotif.notifId"].value = notifId;
	document.forms[0].submit();
}
</script>
<title>List Notification</title>
</head>
<body>
<center>
		<table width="1000px" class="bodyTable boxShadow">
		
			<!-- Header -->
			<tr>
				<td colspan="2"><%@include file="/include/Header.jsp"%></td>
			</tr>
		
			<!-- Content -->
			<tr>
				<td rowspan="2" width="200px" class="navigationBox"><%@include file="/include/Navigation.jsp"%></td>
				<td align="left" class="headerBox blueBackground">Notification</td>
			</tr>
			<tr>
				<td align="center"  class="contentStyle"><br>
					<html:form action="/Login" method="post">
<!-- -------------------------------------- Koding disini ----------------------------------------------------------------------------- -->
						<html:hidden property="task"/>
						<html:hidden property="modelLogNotif.logId"  name="loginForm"/>
						<html:hidden property="modelLogNotif.notifId"  name="loginForm"/>
						<table border="0" width="95%" align="center" class="boxShadow  example table-autosort table-autofilter  table-autopage:10 table-stripeclass:alternate table-page-number:t1page table-page-count:t1pages table-filtered-rowcount:t1filtercount table-rowcount:t1allcount" id="t1">
						
						<thead>
						<tr class="headerBox formHeaderBackground">
							<!-- <th></th> -->
							<th align="center" colspan="4" class="formListStyle filterable table-sortable:default">Notification</th>
							<!-- <th></th> -->
						</tr>
<!-- 						<tr> -->
<!-- 							<th style="padding:5px 7px;" colspan="3"> -->
<!-- 										<input name="filter" size="10" onkeyup="Table.filter(this,this)"/> -->
<!-- 									</th> -->
<!-- 						</tr> -->
						</thead>
						<tbody>
						<logic:notEmpty name="loginForm" property="listNotif">
							<logic:iterate id="listData" name="loginForm" property="listNotif">
								<tr class="formListBackground">
									<td colspan="2" class="formListStyle" style="word-wrap:break-word;">
											<logic:equal value="0" property="isRead" name="listData">
												<a  href="javascript:void(0)" onclick="javascript:flyToPage('<bean:write name="listData" property="logId"/>','<bean:write name="listData" property="notifId"/>');" >
													<bean:write name="listData" property="description"/>
												</a>
											</logic:equal>
											<logic:notEqual value="0" property="isRead" name="listData">
												<a href="javascript:void(0)" onclick="javascript:flyToPage('<bean:write name="listData" property="logId"/>','<bean:write name="listData" property="notifId"/>');" style="font-weight: normal;">
													<bean:write name="listData" property="description"/>
												</a>
											</logic:notEqual>										
									</td>
									<td colspan="2" align="center" class="formListStyle" style="word-wrap:break-word;" width="20%">
										<bean:write name="listData" property="dtmUpdate"/>
									</td>
								</tr>
							</logic:iterate>
						</logic:notEmpty>
						</tbody>
						<tfoot>
							<tr class="headerBox formHeaderBackground">
								<td width="75px" class="table-page:previous formListStyle" style="cursor:pointer;">&lt;&lt; Previous</td>
								<td colspan="2" style="text-align:center; vertical-align: middle;">Page <span id="t1page"></span>&nbsp;of <span id="t1pages"></span></td>
								<td width="55px" align="right" class="table-page:next formListStyle" style="cursor:pointer;">Next &gt;&gt;</td>
							</tr>
<!-- 							<tr> -->
<!-- 								<td class="table-page:previous" style="cursor:pointer; padding:5px 7px; width: 100px;">&lt; &lt; Previous</td> -->
<!-- 								<td colspan="3" style="text-align:center; vertical-align: middle; width: 200px;">Page <span id="t1page"></span>&nbsp;of <span id="t1pages"></span></td> -->
<!-- 								<td align="right" class="table-page:next" style="cursor:pointer; vertical-align: middle; padding:5px 7px; width: 100px;">Next &gt; &gt;</td> -->
<!-- 							</tr> -->
<!-- 							<tr> -->
<!-- 								<td colspan="5" align="center" class="headerBox formHeaderBackground"><span id="t1filtercount"></span>&nbsp;of <span id="t1allcount"></span>&nbsp;rows match filter(s)</td> -->
<!-- 							</tr> -->
						</tfoot>
						</table>
<!-- -------------------------------------- Sampe disini ----------------------------------------------------------------------------- -->
					
					</html:form><br>
				</td>
			</tr>
			
			<!-- Footer -->
			<tr>
				<td align="center" colspan="2" class="headerBox blueBackground">&copy; OME. 2013. All Rights Reserved.</td>
			</tr>
		</table>
	</center>	
</body>
</html>